Platform Explorer / Nuxeo Platform 2021.52

Operation PDF.Encrypt (PDF: Encrypt)

Description

Encrypts the PDF with the given permissions, returning a copy. Permissions are print, modify, copy, modifyAnnot, fillForms, extractForAccessibility, assemble and printDegraded. Any missing permission is set to false (values are true or false, assemble=true for example). originalOwnerPwd is used if the PDF was originally encrypted. If no keyLength is provided, use 128. If the operation is ran on Document(s), xpath lets you specificy where to get the blob from (default: file:content).
Operation id PDF.Encrypt
Category Conversion
Label PDF: Encrypt
Requires
Since

Parameters

Name Description Type Required Default value
originalOwnerPwd string yes  
ownerPwd string yes  
userPwd string yes  
keyLength string no 40, 128 
permissions properties no  
xpath string no file:content 

Signature

Inputs bloblist, blob, document, documents
Outputs bloblist, blob, blob, bloblist

Implementation Information

Implementation Class Class: org.nuxeo.ecm.platform.pdf.operations.PDFEncryptOperation
Contributing Component org.nuxeo.ecm.platform.pdf.operations

JSON Definition

{
  "id" : "PDF.Encrypt",
  "label" : "PDF: Encrypt",
  "category" : "Conversion",
  "requires" : null,
  "description" : "Encrypts the PDF with the given permissions, returning a copy. Permissions are print, modify, copy, modifyAnnot, fillForms, extractForAccessibility, assemble and printDegraded. Any missing permission is set to false (values are true or false, assemble=true for example). originalOwnerPwd is used if the PDF was originally encrypted. If no keyLength is provided, use 128. If the operation is ran on Document(s), xpath lets you specificy where to get the blob from (default: file:content).",
  "url" : "PDF.Encrypt",
  "signature" : [ "bloblist", "bloblist", "blob", "blob", "document", "blob", "documents", "bloblist" ],
  "params" : [ {
    "name" : "originalOwnerPwd",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "ownerPwd",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "userPwd",
    "description" : null,
    "type" : "string",
    "required" : true,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "keyLength",
    "description" : null,
    "type" : "string",
    "required" : false,
    "widget" : "Option",
    "order" : 0,
    "values" : [ "40", "128" ]
  }, {
    "name" : "permissions",
    "description" : null,
    "type" : "properties",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ ]
  }, {
    "name" : "xpath",
    "description" : null,
    "type" : "string",
    "required" : false,
    "widget" : null,
    "order" : 0,
    "values" : [ "file:content" ]
  } ]
}